package com.zy.cat.entity.dev;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;

/**
 * 
 * @info 9趣猫邀请关系实体类
 * @author Link
 * @date 2019-11-02 17:02
 */
@Entity
@Table(name = "zy_cat_user_relation", 
indexes = {
		@Index(name = "unionid", columnList = "unionid"),
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "ypid", columnList = "ypid"),
		@Index(name = "fpid", columnList = "fpid"),
		@Index(name = "ystatus", columnList = "ystatus"),
		@Index(name = "jstatus", columnList = "jstatus"),
		@Index(name = "ytype", columnList = "ytype"),
		@Index(name = "stime", columnList = "stime"),
		@Index(name = "etime", columnList = "etime")
		})
@Data
@RequiredArgsConstructor
@AllArgsConstructor
@ApiModel("9趣猫邀请关系实体类")
public class CatDevRelation {
	
	@Id
	@Column(columnDefinition = "VARCHAR(100) NOT NULL COMMENT '被邀请者微信号unionid【9趣猫邀请关系】'")
	@ApiModelProperty(value = "被邀请者微信号unionid", example = "oQl1f0kaeX9R9GjujjrvsCtfWa4Y")
    private String unionid="";
	
	@Column(columnDefinition = "CHAR(20) DEFAULT '-' COMMENT '被邀请者ID'")
	@ApiModelProperty(value = "被邀请者ID", example = "18986866666")
    private String pid="";
	
	@Column(columnDefinition = "CHAR(20) DEFAULT '1111111111' COMMENT '邀请者ID'")
	@ApiModelProperty(value = "邀请者ID", example = "1111111111")
    private String ypid="";
	
	@Column(columnDefinition = "CHAR(20) DEFAULT '2222222222' COMMENT '父邀请者ID'")
	@ApiModelProperty(value = "父邀请者ID", example = "2222222222")
    private String fpid="";
	
	@Column(columnDefinition = "int(1) DEFAULT '0' COMMENT '邀请类型（0.直接邀请、1.互拆红包邀请）'")
	@ApiModelProperty(value = "邀请类型（0.直接邀请、1.互拆红包邀请、2.淘礼金邀请）", example = "1")
    private int ytype;
	
	@Column(columnDefinition = "int(1) DEFAULT '1' COMMENT '邀请状态（0.已点击邀请链接、1.已注册激活）'")
	@ApiModelProperty(value = "邀请状态（0.已点击邀请链接、1.已注册激活）", example = "1")
    private int ystatus;
	
	@Column(columnDefinition = "int(1) DEFAULT '1' COMMENT '邀请奖励状态（0.无奖励（用户imei,imsi重复注册）、1.有奖励）'")
	@ApiModelProperty(value = "邀请奖励状态（0.无奖励（用户imei,imsi重复注册）、1.有奖励）", example = "1")
    private int jstatus;
	
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '-'  COMMENT '邀请有效开始时间'")
	@ApiModelProperty(value = "邀请有效开始时间", example = "2019-02-22")
	private String stime="";
	
	@Column(columnDefinition = "VARCHAR(10) DEFAULT '-'  COMMENT '邀请有效结束时间'")
	@ApiModelProperty(value = "邀请有效结束时间", example = "2019-02-22")
	private String etime="";
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 10:10:10")
	private String ctime="";
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '更新时间'")
	@ApiModelProperty(value = "更新时间", example = "2019-02-22 10:10:10")
	private String ltime="";
	
	@Column(columnDefinition = "VARCHAR(200) DEFAULT '--' COMMENT '备注'")
	@ApiModelProperty(value = "备注", example = "备注")
    private String info="";
	
}
